<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common/header.jsp" %>	
<form:form commandName="menu">	
			<table border="0" style="width:100%; height:100%" align="center">
				<tr style="height:5%">
					<td>&nbsp;</td>
					<td><label class="text11">Lista de Menues</label></td>
					<td>&nbsp;</td>
				</tr>
				<tr style="height:30%" valign="top">
					<td style="width:15%">&nbsp;</td>
					<td style="width:70%" bgcolor="#FFFFFF">

						<fieldset class="text10" >
							<legend class="text10">Filtros de B&#250;squeda:</legend>
								<table border="0">	
								  <tr>
									<td style="width: 20%">&nbsp;</td>
									<td style="width: 28%">&nbsp;</td>
									<td style="width: 4%">&nbsp;</td>
									<td style="width: 20%">&nbsp;</td>
									<td style="width: 28%">&nbsp;</td>
								  </tr>						  
								  <tr>
									<td class="text1" >Nombre: </td>
									<td><form:input path="nombre" size="50"/> </td>
									<td>&nbsp;</td>
									<td class="text1">Tipo:</td>
									<td>
										<form:select path="tipoMenu.idTipoMenu">
											<form:options items="${tiposMenu}" itemLabel="nombre" itemValue="idTipoMenu"/>										
										</form:select>
									</td>
								  </tr>
								  <tr>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
								  </tr>
								  <tr>
									<td>&nbsp;</td>
									<td>
									    <input type="button" id="Agregar" name="Agregar" 
									    	onclick="location.href='<c:url value="/menu.htm"/>'"
									        value="Agregar"/>
									</td>	
									<td>
									    <input type="button" id="Reporte" name="Reporte" 
									    	onclick="location.href='<c:url value="/exportarMenuReporte.htm"/>'"
									        value="Reporte"/>									
									</td>																	
									<td>
									    <input type="button" id="Reporte" name="Reporte" 
									    	onclick="location.href='<c:url value="/exportarMenuReporteJasper.htm"/>'"
									        value="Reporte Jasper"/>									
									</td>
									<td><input type="submit" id="Buscar" name="Buscar"  value="Buscar"/></td>
									<td>&nbsp;</td>
								  </tr>				  					  
								</table>	
						</fieldset>						

					</td>
					<td style="width:15%">&nbsp;</td>									
				</tr>
				<tr style="height:65%">
					<td>&nbsp;</td>	
					<td valign="top">
					
						<table class="table" style="width:100%" >
							<thead>
								<tr bgcolor="#FFFF99">
									<td class="text1" style="width:50%">Nombre</td>
									<td class="text1" style="width:50%">Precio</td>																
								</tr>								
							</thead>
							<tbody>							
								<c:forEach var="menu" items="${menus}">
									<tr>
										<td><a href="menu.htm?idMenu=${menu.idMenu}"><c:out value="${menu.nombre}"/></a></td>
										<td>$ <c:out value="${menu.precio}"/></td>																
									</tr>								
								</c:forEach>																																																					
							</tbody>
						</table>												
					
					</td>
					<td>&nbsp;</td>			
				</tr>		
			</table>	
</form:form>				
<%@ include file="/common/footer.jsp" %>